package com.hellohoper.test;

import com.hellohoper.cloud.starter.swagger.annotation.EnableSwaggerApi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * Created by hk on 12/13/16.
 */
@SpringBootApplication
@EnableSwaggerApi
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

//    @Bean
//    public Docket appApiDocket() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .groupName("Api")
//                .genericModelSubstitutes(ResponseEntity.class)
//                .useDefaultResponseMessages(false)
//                .forCodeGeneration(false)
//                .pathMapping("/")
//                .select()
//                .paths(PathSelectors.regex("/api/.*"))
//                .build()
//                .apiInfo(new ApiInfo("Swagger Api", null, null, null, new Contact(null, null, null), null, null));
//    }
//
//    @Bean
//    public Docket springBootDocket() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .groupName("Spring Boot")
//                .genericModelSubstitutes(ResponseEntity.class)
//                .useDefaultResponseMessages(false)
//                .forCodeGeneration(false)
//                .pathMapping("/")
//                .select()
//                .paths(PathSelectors.regex("/error.*|/beans.*|/autoconfig.*|/beans.*|/configprops.*|/dump.*" +
//                        "|/info.*|/mappings.*|/trace.*|/env.*|/metrics.*|/health.*"))
//                .build()
//                .apiInfo(new ApiInfo("Swagger Api", null, null, null, new Contact(null, null, null), null, null));
//    }
}
